﻿using CommandLinex;

namespace N_m3u8DL_RE.CommandLinex
{
    public class StringArrayValueProcessor : ICommandLineValueProcessor
    {
        /// <summary>
        /// 从使用逗号字符串值处理为字符串数组。
        /// </summary>
        /// <param name="value"></param>
        /// <param name="targetType"></param>
        /// <returns></returns>
        public object Process(string value, Type targetType)
        {
            if (string.IsNullOrEmpty(value))
                return null;
            return value.Split(",");
        }
    }
}
